import junit.framework.TestCase;

public class TestItem extends TestCase {
	public void testAddQuantity(){
		Item ammunition = new Item("Ammunition", 1);
		int quantityToAdd = 2;
		double resultsExpected = (ammunition.getQuantity() + quantityToAdd) * ammunition.getWeight();
		ammunition.addQuantity(quantityToAdd);

		// Tests the getWeight() method to make sure that addQuantity() updated the weight appropriately.

		assertEquals(resultsExpected, ammunition.getWeight()*ammunition.getQuantity());
	}
}

